<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>header</title>
  <style>
  </style>
</head>
<body>
<div th:fragment="header" >
  <div class="nav clear">
    <div class="container">
      </div>
      <div class="right" style="margin-right: 100px">
        <ul th:if="${session.user != null}">
          <li class="user">
            <a href="javascript:;">
              <span th:text="${session.user.username}">用户名</span>
              <i class="mi-icon icon-down"></i>
            </a>
            <div class="user-menu">
              <a th:href="@{/user/edit}">个人中心</a>
              <a href="">评价晒单</a>
              <a href="">我的喜欢</a>
              <a href="">小米账户</a>
              <a th:href="@{/user/logout}">退出登录</a>
            </div>
          </li>
          <li><a href="">消息通知</a></li>
          <li><a th:href="@{/user/order/list}">我的订单</a></li>
          <li><a th:href="@{/recover/toRecoverList}">我的回收</a></li>
          <li class="cart dropdown">
            <a th:href="@{/user/cart}">
              <i class="mi-icon icon-cart"></i>
              购物车 (0)
            </a>
            <div class="dropdown-content">
              购物车中还没有商品，赶紧选购吧！
            </div>
          </li>
        </ul>
        <ul th:if="${session.user == null}">
          <li><a  th:href="@{/user/toLogin}">登录</a></li>
          <li><a  th:href="@{user/reg}">注册</a></li>
          <!--<li><a href="">消息通知</a></li>-->
          <li class="cart dropdown">
            <a href="user/cart.html" th:href="@{/user/cart}">
              <i class="mi-icon icon-cart" ></i>
              购物车 (0)
            </a>
            <div class="dropdown-content">
              购物车中还没有商品，赶紧选购吧！
            </div>
          </li>
        </ul>
      </div>
    </div>
  <div class="site-header">
    <div class="container clear">
      <div class="logo left">
        <a th:href="@{/}"><img src="/imgs/logo-book.png" style="width: 100px"></a>
      </div>
      <div class="menu left">
        <ul class="clear">
          <li><a href="/search?bookSortId=0">文艺</a></li>
          <li><a href="/search?bookSortId=1">生活</a></li>
          <li><a href="/search?bookSortId=2">科技</a></li>
          <li><a href="/search?bookSortId=3">教育</a></li>
          <li><a href="/search?bookSortId=4">童书</a></li>
          <li><a href="/search?bookSortId=5">人文社科</a></li>
          <li><a href="/search?bookSortId=9">青春文学</a></li>
          <li><a href="/search?bookSortId=10">动漫</a></li>
          <li><a href="/search?bookSortId=11">艺术</a></li>
          <li><a href="/search?bookSortId=30">历史</a></li>
        </ul>
      </div>
      <form class="search right" th:action="@{/search}" method="get">
        <input type="text" name="name" id="key" class="search-key left"/>
        <button type="submit" id="search"><i class="mi-icon icon-search left"></i></button>
      </form>
    </div>
  </div>
</div>

</div>

<div class="site-footer" th:fragment="footer">
  <div class="container">
    <div class="footer-service">
      <ul class="clear">
        <li><a href=""><i class="mi-icon icon-util"></i>预约维修服务</a></li>
        <li><a href=""><i class="mi-icon icon-log"></i>7天无理由退货</a></li>
        <li><a href=""><i class="mi-icon icon-diamond"></i>15天免费换货</a></li>
        <li><a href=""><i class="mi-icon icon-heart"></i>满69包邮</a></li>
        <li><a href=""><i class="mi-icon icon-location"></i>520余家售后网点</a></li>
      </ul>
    </div>
  </div>
</div>
</body>
</html>